.ag-rich-select {
    cursor: default;
    height: 100%;
}

.ag-rich-select-value {
    display: flex;
    align-items: center;
    height: 100%;

    :where(.ag-picker-field-display) {
        overflow: hidden;
        text-overflow: ellipsis;

        &:where(.ag-display-as-placeholder) {
            opacity: 0.5;
        }
    }

    background-color: var(--ag-picker-button-background-color);
    padding: var(--ag-spacing);
}

/* stylelint-disable-next-line selector-max-specificity */
.ag-virtual-list-viewport.ag-rich-select-list {
    position: relative;
    width: 100%;
    height: auto;
    background-color: var(--ag-picker-list-background-color);
    border-radius: var(--ag-input-border-radius);
    border: var(--ag-picker-list-border);
    box-shadow: var(--ag-dropdown-shadow);

    /* stylelint-disable-next-line selector-max-specificity */
    :where(.ag-rich-select-loading) {
        display: flex;
        padding: var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);
    }
}

.ag-rich-select-row {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    height: 100%;
    padding: 0 var(--ag-spacing);
}

.ag-rich-select-row-selected {
    background-color: var(--ag-selected-row-background-color);
}

.ag-rich-select-row:hover,
.ag-rich-select-row-highlighted {
    background-image: linear-gradient(var(--ag-row-hover-color), var(--ag-row-hover-color));
}

.ag-rich-select-row-text-highlight {
    font-weight: bold;
}

.ag-rich-select-field-input {
    flex: 1 1 auto;

    :where(.ag-input-field-input) {
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        text-overflow: ellipsis;

        &::placeholder {
            opacity: 0.8;
        }
    }

    left: var(--ag-spacing);
}

:where(.ag-popup-editor) .ag-rich-select-value {
    height: var(--ag-row-height);
    min-width: 200px;
}

.ag-rich-select-virtual-list-item {
    cursor: default;
    height: var(--ag-list-item-height);
}

.ag-pill-container {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.ag-pill {
    display: flex;
    white-space: nowrap;
    padding: 0 0.25rem;
    align-items: center;
    border-radius: var(--ag-border-radius);
    background: var(--ag-select-cell-background-color);
    border: var(--ag-select-cell-border);
}

.ag-pill-button {
    border: none;
    padding: 0;
    margin-left: var(--ag-spacing);

    &:hover {
        cursor: pointer;
        color: var(--ag-accent-color);
    }
}
